<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
<script type="text/javascript">document.write("<style>input[type=submit] {display:none}</style>")</script>
{% block yui_base_media %}{% load curator_tags %}{% yui_base_media %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
{% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
{% load i18n %}

<body class="yui-skin-sam {% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">

<!-- Container -->
<div id="container">

    {% if not is_popup %}
    <!-- Header -->
    <div id="header">
        <div id="branding">
        {% block branding %}{% endblock %}
        </div>
        {% if user.is_authenticated and user.is_staff %}
        <div id="user-tools">
        {% block userlinks %}
            <ul>
                {% url django-admindocs-docroot as docsroot %}
                {% if docsroot %}
                    <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
                {% endif %}
                <li><a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a></li> 
                <li class="last"><a href="{{ root_path }}logout/">{% trans 'Log out' %}</a></li>
            </ul>
        {% endblock %}
        </div>
        <p id="welcome">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>.</p>
        {% endif %}
        {% block nav-global %}{% endblock %}
    </div>
    <!-- END Header -->
    {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}
    {% endif %}

        {% if messages %}
        <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
        {% endif %}

    <!-- Content -->
    <div id="content" class="{% block coltype %}colM{% endblock %}">
        {% block pretitle %}{% endblock %}
        {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
        {% block content %}
        {% block object-tools %}{% endblock %}
        {{ content }}
        {% endblock %}
        {% block sidebar %}{% endblock %}
        <br class="clear" />
    </div>
    <!-- END Content -->

    {% block footer %}<div id="footer"></div>{% endblock %}
</div>
<!-- END Container -->

</body>
</html>
{% block end %}
<script type="text/javascript">
(function(){
    var buttons = YAHOO.util.Selector.query('input[type=submit]');
    for (var j=0; j<buttons.length; j++){
        btn = new YAHOO.widget.Button(buttons[j]);
        if (YAHOO.util.Dom.hasClass(buttons[j], 'default')) {
            btn.addClass('yui-default-button');
        }
        {% if opts.get_ordered_objects and change %}
        if (buttons[j].name in ['_save', '_saveasnew', '_addanother', '_continue']) {
            btn.onclick = submitOrderForm();   
        }
        {% endif %}
    }
})()
</script>
{% endblock %}
